}
}
- _gtk_widget_set_simple_clip (widget);
+ _gtk_widget_set_simple_clip (widget, NULL);
}
static void
}
gtk_widget_size_allocate_with_baseline (priv->center->widget, &child_allocation, baseline);
- _gtk_widget_set_simple_clip (widget);
+ _gtk_widget_set_simple_clip (widget, NULL);
}
static void
gtk_widget_size_allocate_with_baseline (child, &child_allocation, baseline);
}
- _gtk_widget_set_simple_clip (widget);
+ _gtk_widget_set_simple_clip (widget, NULL);
}
static gboolean
allocation->width,
allocation->height);
- _gtk_widget_set_simple_clip (widget);
+ _gtk_widget_set_simple_clip (widget, NULL);
}
static gboolean
gtk_widget_size_allocate (child_widget, &child);
}
- _gtk_widget_set_simple_clip (widget);
+ _gtk_widget_set_simple_clip (widget, NULL);
}
#undef GTK_COMBO_BOX_ALLOCATE_BUTTON
_gtk_entry_completion_resize_popup (completion);
}
- _gtk_widget_set_simple_clip (widget);
+ _gtk_widget_set_simple_clip (widget, NULL);
}
static gboolean
gtk_grid_request_allocate_children (&request);
- _gtk_widget_set_simple_clip (widget);
+ _gtk_widget_set_simple_clip (widget, NULL);
}
static gboolean
{
GTK_WIDGET_CLASS (gtk_level_bar_parent_class)->size_allocate (widget, allocation);
- _gtk_widget_set_simple_clip (widget);
+ _gtk_widget_set_simple_clip (widget, NULL);
}
static void
gtk_widget_size_allocate (child, &child_allocation);
}
- _gtk_widget_set_simple_clip (widget);
+ _gtk_widget_set_simple_clip (widget, NULL);
}
/**
/* No path is set; we don't have to allocate anything. */
if (path_bar->priv->button_list == NULL)
{
- _gtk_widget_set_simple_clip (widget);
+ _gtk_widget_set_simple_clip (widget, NULL);
return;
}
if (needs_reorder)
child_ordering_changed (path_bar);
- _gtk_widget_set_simple_clip (widget);
+ _gtk_widget_set_simple_clip (widget, NULL);
}
static void
{
GTK_WIDGET_CLASS (gtk_progress_bar_parent_class)->size_allocate (widget, allocation);
- _gtk_widget_set_simple_clip (widget);
+ _gtk_widget_set_simple_clip (widget, NULL);
}
static void
else
priv->handle_x = 0;
- _gtk_widget_set_simple_clip (widget);
+ _gtk_widget_set_simple_clip (widget, NULL);
}
static void
g_free (allocations);
g_free (new_states);
- _gtk_widget_set_simple_clip (widget);
+ _gtk_widget_set_simple_clip (widget, NULL);
}
static void
/*
* _gtk_widget_set_simple_clip:
* @widget: a #GtkWidget
+ * @content_clip: Clipping area of the contents or %NULL, if the contents
+ * do not extent the allocation.
*
* This is a convenience function for gtk_widget_set_clip(), if you
* just want to set the clip for @widget based on its allocation,
* function and must call gtk_widget_set_clip() yourself.
**/
void
-_gtk_widget_set_simple_clip (GtkWidget *widget)
+_gtk_widget_set_simple_clip (GtkWidget *widget,
+ GtkAllocation *content_clip)
{
GtkStyleContext *context;
GtkAllocation clip;
clip.width += extents.left + extents.right;
clip.height += extents.top + extents.bottom;
+ if (content_clip)
+ gdk_rectangle_union (content_clip, &clip, &clip);
+
if (GTK_IS_CONTAINER (widget))
gtk_container_forall (GTK_CONTAINER (widget), union_with_clip, &clip);
void _gtk_widget_set_style (GtkWidget *widget,
GtkStyle *style);
gboolean _gtk_widget_supports_clip (GtkWidget *widget);
-void _gtk_widget_set_simple_clip (GtkWidget *widget);
+void _gtk_widget_set_simple_clip (GtkWidget *widget,
+ GtkAllocation *content_clip);
typedef gboolean (*GtkCapturedEventHandler) (GtkWidget *widget, GdkEvent *event);